home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / ambos / mailer.lha / Mailer / Mailer.REXX < prev    next >
OS/2 REXX Batch file  |  1995-09-10  |  2KB  |  4 lines

  1.             /********************************************
  2.             *     automatischen Rundbrief erstellen     *
  3.             ********************************************/                                       ;call DATE();call TIME('R');DAT=(left(DATE('E'),2))||'.'||(substr(DATE('E'),4,2))||'.'||(right(DATE('E'),2));TIM=left(TIME('n'),5);SIGNAL ON SYNTAX;SIGNAL ON BREAK_C;SIGNAL ON BREAK_E;PARSE ARG ABS LISTE TEXTFILE BET X;if ~show('L','rexxsupport.library') then do;addlib('rexxsupport.library',0,-30,0);end;say 'Absender: <'||ABS||'>  Betreff: <'||BET||'>';say '';A=1;B=0;open('EMPLISTE',LISTE,'R');do while ~eof('EMPLISTE');EMP=readln('EMPLISTE');if (A=1)&(EMP='') then do;say 'Es existiert keine gⁿltige Userliste!';signal REPORT;end;COMMAND='C:SMail >NIL: "'||ABS||'" "'||(word(EMP,1))||'" "'||BET||'" '||TEXTFILE||' '||('T:Sort/Mail'||A);A=A+1;if EMP~='' then do;X='an User.';if left(EMP,1)='/' then do;X='im Brett';B=B+1;end;say 'Erstelle Mail '||X||'..: <'||EMP||'>';address command COMMAND;end;end;REPORT:;say 'Erstelle Report-Mail an.: <'||ABS||'>';address command 'Echo >>T:Mail "           ╔═══════════════════════════════════════╗"';address command 'Echo >>T:Mail "           ║                                       ║"';address command 'Echo >>T:Mail "           ║        AmBoS Systeminformation        ║"';address command 'Echo >>T:Mail "           ║                                       ║"';address command 'Echo >>T:Mail "           ╚═══════════════════════════════════════╝"';address command 'Echo >>T:Mail ""';address command 'Echo >>T:Mail "Es wurde ein automatischer Rundbrief erstellt: '||DAT||' - '||TIM||' Uhr."';USER='Insgesamt wurden '||((A-B)-2)||' User angeschrieben ';BRETTER='und '||B||' Bretter!"';if ((A-B)-2)=1 then USER='Es wurde ein User angeschrieben ';if ((A-B)-2)=0 then USER='Es wurde kein User angeschrieben ';if B=1 then BRETTER='und ein Brett!"';if B=0 then BRETTER='aber kein Brett!"';if (B=1)&(((A-B)-2)=0) then BRETTER='aber ein Brett!"';address command 'Echo >>T:Mail "'||USER||BRETTER;address command 'Echo >>T:Mail "Diese Nachricht wurde automatisch erstellt."';address command 'Echo >>T:Mail ""';address command 'Echo >>T:Mail "             [ Mailer v1.1 - von bAStARd / hEllGAtE BBS ]"';address command 'Echo >>T:Mail ""';COMMAND='C:SMail >NIL: "AmBoS'||(substr(ABS,(pos('@',ABS))))||'" "'||ABS||'" "Rundbrief-Report" T:Mail T:Sort/Mail';address command COMMAND;ENDE:;close('EMPLISTE');close('OUTPUT');exit
  4.